package qlsl.androiddesign.adapter.subadapter;

import java.util.HashMap;
import java.util.List;

import com.qlsl.androiddesign.kuaiwa.R;

import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import qlsl.androiddesign.activity.baseactivity.BaseActivity;
import qlsl.androiddesign.adapter.baseadapter.BaseAdapter;
import qlsl.androiddesign.entity.otherentity.ShoppingDetail;
import qlsl.androiddesign.util.commonutil.ImageUtils;

/**
 * 挖币兑换专区
 * 
 * @author Administrator ShoppingDetail
 * @param <T>
 */
public class PostingListAdapter extends BaseAdapter<ShoppingDetail> {

	public PostingListAdapter(BaseActivity activity, List<ShoppingDetail> list) {
		super(activity, list);
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		convertView = getItemView(convertView, R.layout.griditem_posting_goods);
		ImageView iv_icon = getView(convertView, R.id.iv_icon);
		TextView tv_name = getView(convertView, R.id.tv_name);
		TextView tv_jifen = getView(convertView, R.id.tv_jifen);

		ShoppingDetail pg = getItem(position);

		tv_name.setText(pg.getGoodsname());
		tv_jifen.setText(pg.getPoints() + "挖币");
		ImageUtils.rect(convertView.getContext(), pg.getPhoto(), iv_icon);

		return convertView;
	}
}
